<div id="debug">

	<h2>Debug Information</h2>
	
    <?php if (!empty($this->dump)): ?>
        <div class="section" id="debug-console-dump">
            <h3>Debug dump</h3>
            <ol>
                <?php foreach ($this->dump as $dump): ?>
                    <li><pre><?= $dump ?></pre></li>
                <?php endforeach ?>
            </ol>
        </div> <!-- /#debug-console-log -->
    <?php endif ?>
    
    <?php if (!empty($this->log)): ?>
        <div class="section" id="debug-console-log">
            <h3>Log Messages</h3>
            <ol>
                <?php foreach ($this->log as $message): ?>
                    <li><?= $message ?></li>
                <?php endforeach ?>
            </ol>
        </div> <!-- /#debug-console-log -->
    <?php endif ?>
	
    <?php if (!empty($this->flash)): ?>
        <div class="section" id="debug-console-flash">
            <h3>Flash Messages</h3>
            <ol>
                <?php foreach ($this->flash as $message): ?>
                    <li><?= $message ?></li>
                <?php endforeach ?>
            </ol>
        </div> <!-- /#debug-console-flash -->
    <?php endif ?>
    
    <div class="section" id="debug-console-view">
        <h3>View Information</h3>
        <table class="view-vars">
            <caption>View Variables</caption>
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Value</th>
                </tr>
            </thead>
            <tbody>
                <?php /* $this->partialLoop('_partials/debug/view-vars.phtml', $this->templateVars) */ ?>
				<?php foreach ($this->templateVars as $val): ?>
					<?php if ($val['var'] instanceof Zend_Paginator) continue; ?>
					<tr>
						<td><?= $this->e($val['key']) ?></td>
						<td><?= pr($val['var']) ?></td>
					</tr>
				<?php endforeach ?>
            </tbody>
        </table>
    </div> <!-- /#debug-console-view -->
    
    <?php if (!empty($this->get)): ?>
        <div class="section" id="debug-console-get">
            <h3>GET variables</h3>
            <ol>
                <?php foreach ($this->get as $key => $val): ?>
                    <li><strong><?= $key ?></strong> <?= pr($val) ?></li>
                <?php endforeach ?>
            </ol>
        </div> <!-- /#debug-console-flash -->
    <?php endif ?>
    
    <?php if (!empty($this->post)): ?>
        <div class="section" id="debug-console-post">
            <h3>POST variables</h3>
            <ol>
                <?php foreach ($this->post as $key => $val): ?>
                    <li><strong><?= $key ?></strong> <?= pr($val) ?></li>
                <?php endforeach ?>
            </ol>
        </div> <!-- /#debug-console-flash -->
    <?php endif ?>
    
    <?php if (!empty($this->session)): ?>
        <div class="section" id="debug-console-session">
            <h3>SESSION variables</h3>
            <ol>
                <?php foreach ($this->session as $key => $val): ?>
                    <li><strong><?= $key ?></strong> <?= pr($val) ?></li>
                <?php endforeach ?>
            </ol>
        </div> <!-- /#debug-console-flash -->
    <?php endif ?>
    
    <?php if (!empty($this->cookie)): ?>
        <div class="section" id="debug-console-cookie">
            <h3>COOKIE variables</h3>
            <ol>
                <?php foreach ($this->cookie as $key => $val): ?>
                    <li><strong><?= $key ?></strong> <?= $val ?></li>
                <?php endforeach ?>
            </ol>
        </div> <!-- /#debug-console-flash -->
    <?php endif ?>

	<?php /*
	<h3>Database Profiler</h3>
	<?php if (is_array($this->dbprofiler->getQueryProfiles())): ?>
		<?php foreach($this->dbprofiler->getQueryProfiles() as $query): ?>
			<pre><?= $query->getQuery() ?></pre>
		<?php endforeach ?>
	<?php else: ?>
		<p>There were no queries executed on this page.</p>
	<?php endif ?>
	
	<h3>Environmental Information</h3>
	<h4>GET</h4>
	<?php Zend_Debug::dump($_GET) ?>
	<h4>POST</h4>
	<?php Zend_Debug::dump($_POST) ?>
	<h4>Session</h4>
	<?php Zend_Debug::dump($_SESSION) ?>
	<h4>Cookie</h4>
	<?php Zend_Debug::dump($_COOKIE) ?>
	*/ ?>

</div> <!-- /#debug -->